package org.codefinger.dao.util.jdbc;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Date;

public class DateSetter implements StatementSetter {

	public static final DateSetter	INSTANCE	= new DateSetter();

	private DateSetter() {

	}

	@Override
	public void setParam(PreparedStatement statement, int index, Object param) throws SQLException {
		statement.setTimestamp(index, new Timestamp(((Date) param).getTime()));
	}
}
